
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../Another/Style/bootstrap.css"/>
<style>
.control-label{
	margin-left: 100px;
	margin-right: 10px;
}
</style>
<?php 
if (isset ($_REQUEST["MaLoai"]))
{
	include_once "../MyControl/connection.php";
	$MaLoai = $_REQUEST['MaLoai'];
	$sql = "SELECT * FROM loaisanpham WHERE MaLoai='" .$MaLoai."'";
	$result = mysql_query($sql);
	
	if($row = mysql_fetch_array($result))
	{
		
		$TenLoai =$row['TenLoai'];
		$TenChiTietLoai = $row['TenChiTietLoai'];
	}
}
?>

  <div class="container">
	  <div class="row">
	  		<div class="span8">
		<form class="form-horizontal" id="registerHere" method='post' action="../MyControl/capnhatloai.php">
	  <fieldset>
	    <legend>Cập Nhật Loại Sản Phẩm</legend>
         <input type="hidden" class="input-xlarge" id="MaLoai" name="MaLoai" rel="popover" value="<?php if(isset($MaLoai)) echo $MaLoai;?>"/>
              
	     
	 <div class="control-group">
		<label class="control-label" for="input01">Tên Loại</label>
	      <div class="controls">
	        <input type="text" class="input-xlarge" id="TenLoai" name="TenLoai" rel="popover" value="<?php if(isset($TenLoai)) echo $TenLoai;?>"/>
	       
	      </div>
	</div>
	
    <div class="control-group">
		<label class="control-label" for="input01">Tên Chi Tiết Loại</label>
	      <div class="controls">
	        <input type="text" class="input-xlarge" id="TenChiTietLoai" name="TenChiTietLoai" rel="popover" value="<?php if(isset($TenChiTietLoai)) echo $TenChiTietLoai;?>"/>
	       </div>
	</div>
   
	<div class="control-group">
		<label class="control-label" for="input01"></label>
	      <div class="controls">
	       <button type="submit" class="btn btn-success" rel="tooltip" title="first tooltip" name="CapNhat">Cập Nhật</button>
           &nbsp;
            &nbsp;
             &nbsp;
              &nbsp;
	        <button type="reset" class="btn btn-success" rel="tooltip" title="first tooltip">Nhập Lại</button>
	      </div>
			
	</div>
	</fieldset>
	</form>
   </div>
	
		</div>
        
        
          </div><!--/row-->
        </div><!--/span-->
      </div><!--/row-->
